#include <stdio.h>
#include <stdlib.h>

int main()
{
    int randomnum[10],amountofrand=0,j,temp,n;
    while(amountofrand<10) {
        do {
            randomnum[amountofrand] = rand()%10+1;
            for(j=0; j<amountofrand; j++) {
                if(randomnum[j]==randomnum[amountofrand]) {
                    break;
                }
            }
        } while(j!=amountofrand);
        amountofrand++;
    }
    for(j=0; j<10; j++) {
        printf("%d ",randomnum[j]);
    }
    return 0;
}